<template>
	<view class="content">
		<view class="search_box">
			<!-- 搜索 -->
			<view class="search-form">
				<view class="title-item">
					<view class="title">沈阳市</view>
					<u-image width="14rpx" height="7rpx" src="/static/images/a39.png"></u-image>
				</view>
				<u-search placeholder="请输入预约地址" v-model="keyword" :showAction="false"></u-search>
			</view>
			<!-- 当前定位 -->
			<view class="now-position" v-if="!keyword">
				<view class="position">当前：沈阳市南五马路</view>
				<view class="refresh-box">
					<u-icon name="map-fill" color="#333333" size="20"></u-icon>
					<view class="">重新定位</view>
				</view>
			</view>
		</view>
		<view class="search_result" v-if="keyword">
			<view class="search_title">搜索结果</view>
			<view class="result_list">
				<view class="result_box" v-for="(item,index) in 6" :key="index">
					<view class="shop_name">济世堂中医诊疗南五马路店</view>
					<view class="shop_address">爱国路2993号与津军路交叉口栋180米</view>
				</view>
			</view>
		</view>
		
		
		<template v-else>
			<view class="search_result">
				<view class="search_title">常用门店</view>
				<view class="result_list">
					<view class="result_box">
						<view class="shop_name">济世堂中医诊疗南五马路店</view>
						<view class="shop_address">爱国路2993号与津军路交叉口栋180米</view>
					</view>
				</view>
			</view>
			<view class="search_result">
				<view class="search_title">附近门店</view>
				<view class="result_list">
					<view class="result_box" v-for="(item,index) in 6" :key="index">
						<view class="shop_name">济世堂中医诊疗南五马路店</view>
						<view class="shop_address">爱国路2993号与津军路交叉口栋180米</view>
					</view>
				</view>
			</view>
		</template>
	</view>
</template>

<script setup>
	const keyword = ref('')
</script>

<style lang="scss" scoped>
	.content {
		background: #F5F6F8;
	}

	.search_box {
		background: #FFFFFF;
		padding: 34rpx 26rpx;
		.search-form {
			@include between(100%);
			.title-item {
				display: flex;
				align-items: center;
				margin-right: 30rpx;
				.title {
					font-size: 28rpx;
					color: #333333;
					margin-right: 10rpx;
				}
			}
		}
		.now-position {
			@include between(100%);
			margin-top: 38rpx;
			font-size: 28rpx;
			color: #333333;
			.refresh-box {
				@include start();
				& > view {
					margin-left: 10rpx;
				}
			}
		}
	}

	.search_result {
		margin-top: 20rpx;
		padding: 30rpx 26rpx;
		background: #FFFFFF;

		.search_title {
			font-size: 32rpx;
			color: #333333;
			font-weight: bold;
			// margin-bottom: 30rpx;
		}

		.result_list {
			// border: 1rpx solid red;
			.result_box {
				padding: 30rpx 26rpx;
				border-bottom: 1rpx solid #E4E4E4;

				.shop_name {

					font-size: 28rpx;
					font-weight: 500;
					color: #333333;
					margin-bottom: 14rpx;
				}

				.shop_address {

					font-size: 26rpx;
					color: #333333;
				}
			}
		}
	}
</style>